import 'package:factoryside/bean/acc_detail_entity.dart';

accDetailEntityFromJson(AccDetailEntity data, Map<String, dynamic> json) {
	if (json['AccessoryDate'] != null) {
		data.accessoryDate = new List<AccDetailAccessoryDate>();
		(json['AccessoryDate'] as List).forEach((v) {
			data.accessoryDate.add(new AccDetailAccessoryDate().fromJson(v));
		});
	}
	if (json['imgStr'] != null) {
		data.imgStr = json['imgStr']?.map((v) => v.toString())?.toList()?.cast<String>();
	}
	if (json['accessory'] != null) {
		data.accessory = new AccDetailAccessory().fromJson(json['accessory']);
	}
	if (json['SendUser'] != null) {
		data.sendUser = json['SendUser'].toString();
	}
	if (json['StateHtml'] != null) {
		data.stateHtml = json['StateHtml'].toString();
	}
	if (json['OrderProductList'] != null) {
		data.orderProductList = new List<AccDetailOrderProductList>();
		(json['OrderProductList'] as List).forEach((v) {
			data.orderProductList.add(new AccDetailOrderProductList().fromJson(v));
		});
	}
	return data;
}

Map<String, dynamic> accDetailEntityToJson(AccDetailEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	if (entity.accessoryDate != null) {
		data['AccessoryDate'] =  entity.accessoryDate.map((v) => v.toJson()).toList();
	}
	data['imgStr'] = entity.imgStr;
	if (entity.accessory != null) {
		data['accessory'] = entity.accessory.toJson();
	}
	data['SendUser'] = entity.sendUser;
	data['StateHtml'] = entity.stateHtml;
	if (entity.orderProductList != null) {
		data['OrderProductList'] =  entity.orderProductList.map((v) => v.toJson()).toList();
	}
	return data;
}

accDetailAccessoryDateFromJson(AccDetailAccessoryDate data, Map<String, dynamic> json) {
	if (json['Id'] != null) {
		data.id = json['Id'] is String
				? int.tryParse(json['Id'])
				: json['Id'].toInt();
	}
	if (json['AccessoryDetailID'] != null) {
		data.accessoryDetailID = json['AccessoryDetailID'] is String
				? int.tryParse(json['AccessoryDetailID'])
				: json['AccessoryDetailID'].toInt();
	}
	if (json['OrderID'] != null) {
		data.orderID = json['OrderID'] is String
				? int.tryParse(json['OrderID'])
				: json['OrderID'].toInt();
	}
	if (json['OrderProdID'] != null) {
		data.orderProdID = json['OrderProdID'] is String
				? int.tryParse(json['OrderProdID'])
				: json['OrderProdID'].toInt();
	}
	if (json['FAccessoryID'] != null) {
		data.fAccessoryID = json['FAccessoryID'] is String
				? int.tryParse(json['FAccessoryID'])
				: json['FAccessoryID'].toInt();
	}
	if (json['FAccessoryName'] != null) {
		data.fAccessoryName = json['FAccessoryName'].toString();
	}
	if (json['Quantity'] != null) {
		data.quantity = json['Quantity'] is String
				? int.tryParse(json['Quantity'])
				: json['Quantity'].toInt();
	}
	if (json['CreateTime'] != null) {
		data.createTime = json['CreateTime'].toString();
	}
	if (json['IsUse'] != null) {
		data.isUse = json['IsUse'].toString();
	}
	if (json['Price'] != null) {
		data.price = json['Price'] is String
				? double.tryParse(json['Price'])
				: json['Price'].toDouble();
	}
	if (json['SizeID'] != null) {
		data.sizeID = json['SizeID'] is String
				? int.tryParse(json['SizeID'])
				: json['SizeID'].toInt();
	}
	if (json['AccessoryID'] != null) {
		data.accessoryID = json['AccessoryID'] is String
				? int.tryParse(json['AccessoryID'])
				: json['AccessoryID'].toInt();
	}
	if (json['AccessoryType'] != null) {
		data.accessoryType = json['AccessoryType'] is String
				? int.tryParse(json['AccessoryType'])
				: json['AccessoryType'].toInt();
	}
	if (json['OldAccessoryID'] != null) {
		data.oldAccessoryID = json['OldAccessoryID'] is String
				? int.tryParse(json['OldAccessoryID'])
				: json['OldAccessoryID'].toInt();
	}
	if (json['Version'] != null) {
		data.version = json['Version'] is String
				? int.tryParse(json['Version'])
				: json['Version'].toInt();
	}
	return data;
}

Map<String, dynamic> accDetailAccessoryDateToJson(AccDetailAccessoryDate entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['Id'] = entity.id;
	data['AccessoryDetailID'] = entity.accessoryDetailID;
	data['OrderID'] = entity.orderID;
	data['OrderProdID'] = entity.orderProdID;
	data['FAccessoryID'] = entity.fAccessoryID;
	data['FAccessoryName'] = entity.fAccessoryName;
	data['Quantity'] = entity.quantity;
	data['CreateTime'] = entity.createTime;
	data['IsUse'] = entity.isUse;
	data['Price'] = entity.price;
	data['SizeID'] = entity.sizeID;
	data['AccessoryID'] = entity.accessoryID;
	data['AccessoryType'] = entity.accessoryType;
	data['OldAccessoryID'] = entity.oldAccessoryID;
	data['Version'] = entity.version;
	return data;
}

accDetailAccessoryFromJson(AccDetailAccessory data, Map<String, dynamic> json) {
	if (json['Id'] != null) {
		data.id = json['Id'] is String
				? int.tryParse(json['Id'])
				: json['Id'].toInt();
	}
	if (json['BrandID'] != null) {
		data.brandID = json['BrandID'] is String
				? int.tryParse(json['BrandID'])
				: json['BrandID'].toInt();
	}
	if (json['OldBeyondID'] != null) {
		data.oldBeyondID = json['OldBeyondID'].toString();
	}
	if (json['ApplyMaster'] != null) {
		data.applyMaster = json['ApplyMaster'] is String
				? int.tryParse(json['ApplyMaster'])
				: json['ApplyMaster'].toInt();
	}
	if (json['AccessoryID'] != null) {
		data.accessoryID = json['AccessoryID'] is String
				? int.tryParse(json['AccessoryID'])
				: json['AccessoryID'].toInt();
	}
	if (json['FAccessoryID'] != null) {
		data.fAccessoryID = json['FAccessoryID'] is String
				? int.tryParse(json['FAccessoryID'])
				: json['FAccessoryID'].toInt();
	}
	if (json['ReturnExpressNo'] != null) {
		data.returnExpressNo = json['ReturnExpressNo'].toString();
	}
	if (json['FAccessoryName'] != null) {
		data.fAccessoryName = json['FAccessoryName'].toString();
	}
	if (json['SendState'] != null) {
		data.sendState = json['SendState'].toString();
	}
	if (json['Quantity'] != null) {
		data.quantity = json['Quantity'] is String
				? int.tryParse(json['Quantity'])
				: json['Quantity'].toInt();
	}
	if (json['OrderID'] != null) {
		data.orderID = json['OrderID'] is String
				? int.tryParse(json['OrderID'])
				: json['OrderID'].toInt();
	}
	if (json['CreateTime'] != null) {
		data.createTime = json['CreateTime'].toString();
	}
	if (json['Relation'] != null) {
		data.relation = json['Relation'].toString();
	}
	if (json['Price'] != null) {
		data.price = json['Price'] is String
				? double.tryParse(json['Price'])
				: json['Price'].toDouble();
	}
	if (json['PostMoney'] != null) {
		data.postMoney = json['PostMoney'] is String
				? double.tryParse(json['PostMoney'])
				: json['PostMoney'].toDouble();
	}
	if (json['DiscountPrice'] != null) {
		data.discountPrice = json['DiscountPrice'] is String
				? double.tryParse(json['DiscountPrice'])
				: json['DiscountPrice'].toDouble();
	}
	if (json['IsUse'] != null) {
		data.isUse = json['IsUse'].toString();
	}
	if (json['SendAddress'] != null) {
		data.sendAddress = json['SendAddress'].toString();
	}
	if (json['IsPay'] != null) {
		data.isPay = json['IsPay'].toString();
	}
	if (json['ExpressNo'] != null) {
		data.expressNo = json['ExpressNo'].toString();
	}
	if (json['State'] != null) {
		data.state = json['State'].toString();
	}
	if (json['StateText'] != null) {
		data.stateText = json['StateText'].toString();
	}
	if (json['AccessoryState'] != null) {
		data.accessoryState = json['AccessoryState'].toString();
	}
	if (json['TypeID'] != null) {
		data.typeID = json['TypeID'].toString();
	}
	if (json['SizeID'] != null) {
		data.sizeID = json['SizeID'] is String
				? int.tryParse(json['SizeID'])
				: json['SizeID'].toInt();
	}
	if (json['FCategoryID'] != null) {
		data.fCategoryID = json['FCategoryID'] is String
				? int.tryParse(json['FCategoryID'])
				: json['FCategoryID'].toInt();
	}
	if (json['ApplyNum'] != null) {
		data.applyNum = json['ApplyNum'] is String
				? int.tryParse(json['ApplyNum'])
				: json['ApplyNum'].toInt();
	}
	if (json['Photo1'] != null) {
		data.photo1 = json['Photo1'].toString();
	}
	if (json['Photo2'] != null) {
		data.photo2 = json['Photo2'].toString();
	}
	if (json['Photos'] != null) {
		data.photos = new List<dynamic>();
		data.photos.addAll(json['Photos']);
	}
	if (json['NeedPlatformAuth'] != null) {
		data.needPlatformAuth = json['NeedPlatformAuth'].toString();
	}
	if (json['CheckRemarks'] != null) {
		data.checkRemarks = json['CheckRemarks'].toString();
	}
	if (json['Bak'] != null) {
		data.bak = json['Bak'].toString();
	}
	if (json['IsReturn'] != null) {
		data.isReturn = json['IsReturn'].toString();
	}
	if (json['PostPayType'] != null) {
		data.postPayType = json['PostPayType'].toString();
	}
	if (json['RecipientType'] != null) {
		data.recipientType = json['RecipientType'].toString();
	}
	if (json['OldReturnRequest'] != null) {
		data.oldReturnRequest = json['OldReturnRequest'].toString();
	}
	if (json['AddressBack'] != null) {
		data.addressBack = json['AddressBack'].toString();
	}
	if (json['QApplyNum'] != null) {
		data.qApplyNum = json['QApplyNum'] is String
				? int.tryParse(json['QApplyNum'])
				: json['QApplyNum'].toInt();
	}
	if (json['DeliverGoodsType'] != null) {
		data.deliverGoodsType = json['DeliverGoodsType'] is String
				? int.tryParse(json['DeliverGoodsType'])
				: json['DeliverGoodsType'].toInt();
	}
	if (json['DeliverGoodsTime'] != null) {
		data.deliverGoodsTime = json['DeliverGoodsTime'];
	}
	if (json['Order'] != null) {
		data.order = json['Order'];
	}
	if (json['limit'] != null) {
		data.limit = json['limit'] is String
				? int.tryParse(json['limit'])
				: json['limit'].toInt();
	}
	if (json['page'] != null) {
		data.page = json['page'] is String
				? int.tryParse(json['page'])
				: json['page'].toInt();
	}
	if (json['BeyondDistance'] != null) {
		data.beyondDistance = json['BeyondDistance'].toString();
	}
	if (json['ImgUrls'] != null) {
		data.imgUrls = new List<dynamic>();
		data.imgUrls.addAll(json['ImgUrls']);
	}
	if (json['OrderAttachments'] != null) {
		data.orderAttachments = new List<dynamic>();
		data.orderAttachments.addAll(json['OrderAttachments']);
	}
	if (json['AccessoryDetailModels'] != null) {
		data.accessoryDetailModels = new List<dynamic>();
		data.accessoryDetailModels.addAll(json['AccessoryDetailModels']);
	}
	if (json['AccessoryNo'] != null) {
		data.accessoryNo = json['AccessoryNo'].toString();
	}
	if (json['ReturnState'] != null) {
		data.returnState = json['ReturnState'].toString();
	}
	if (json['StopRemarks'] != null) {
		data.stopRemarks = json['StopRemarks'].toString();
	}
	if (json['GiveUpRemarks'] != null) {
		data.giveUpRemarks = json['GiveUpRemarks'].toString();
	}
	if (json['ProdName'] != null) {
		data.prodName = json['ProdName'].toString();
	}
	if (json['Version'] != null) {
		data.version = json['Version'] is String
				? int.tryParse(json['Version'])
				: json['Version'].toInt();
	}
	return data;
}

Map<String, dynamic> accDetailAccessoryToJson(AccDetailAccessory entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['Id'] = entity.id;
	data['BrandID'] = entity.brandID;
	data['OldBeyondID'] = entity.oldBeyondID;
	data['ApplyMaster'] = entity.applyMaster;
	data['AccessoryID'] = entity.accessoryID;
	data['FAccessoryID'] = entity.fAccessoryID;
	data['ReturnExpressNo'] = entity.returnExpressNo;
	data['FAccessoryName'] = entity.fAccessoryName;
	data['SendState'] = entity.sendState;
	data['Quantity'] = entity.quantity;
	data['OrderID'] = entity.orderID;
	data['CreateTime'] = entity.createTime;
	data['Relation'] = entity.relation;
	data['Price'] = entity.price;
	data['PostMoney'] = entity.postMoney;
	data['DiscountPrice'] = entity.discountPrice;
	data['IsUse'] = entity.isUse;
	data['SendAddress'] = entity.sendAddress;
	data['IsPay'] = entity.isPay;
	data['ExpressNo'] = entity.expressNo;
	data['State'] = entity.state;
	data['StateText'] = entity.stateText;
	data['AccessoryState'] = entity.accessoryState;
	data['TypeID'] = entity.typeID;
	data['SizeID'] = entity.sizeID;
	data['FCategoryID'] = entity.fCategoryID;
	data['ApplyNum'] = entity.applyNum;
	data['Photo1'] = entity.photo1;
	data['Photo2'] = entity.photo2;
	if (entity.photos != null) {
		data['Photos'] =  [];
	}
	data['NeedPlatformAuth'] = entity.needPlatformAuth;
	data['CheckRemarks'] = entity.checkRemarks;
	data['Bak'] = entity.bak;
	data['IsReturn'] = entity.isReturn;
	data['PostPayType'] = entity.postPayType;
	data['RecipientType'] = entity.recipientType;
	data['OldReturnRequest'] = entity.oldReturnRequest;
	data['AddressBack'] = entity.addressBack;
	data['QApplyNum'] = entity.qApplyNum;
	data['DeliverGoodsType'] = entity.deliverGoodsType;
	data['DeliverGoodsTime'] = entity.deliverGoodsTime;
	data['Order'] = entity.order;
	data['limit'] = entity.limit;
	data['page'] = entity.page;
	data['BeyondDistance'] = entity.beyondDistance;
	if (entity.imgUrls != null) {
		data['ImgUrls'] =  [];
	}
	if (entity.orderAttachments != null) {
		data['OrderAttachments'] =  [];
	}
	if (entity.accessoryDetailModels != null) {
		data['AccessoryDetailModels'] =  [];
	}
	data['AccessoryNo'] = entity.accessoryNo;
	data['ReturnState'] = entity.returnState;
	data['StopRemarks'] = entity.stopRemarks;
	data['GiveUpRemarks'] = entity.giveUpRemarks;
	data['ProdName'] = entity.prodName;
	data['Version'] = entity.version;
	return data;
}

accDetailOrderProductListFromJson(AccDetailOrderProductList data, Map<String, dynamic> json) {
	if (json['Id'] != null) {
		data.id = json['Id'] is String
				? int.tryParse(json['Id'])
				: json['Id'].toInt();
	}
	if (json['OrderProdcutID'] != null) {
		data.orderProdcutID = json['OrderProdcutID'] is String
				? int.tryParse(json['OrderProdcutID'])
				: json['OrderProdcutID'].toInt();
	}
	if (json['OrderID'] != null) {
		data.orderID = json['OrderID'] is String
				? int.tryParse(json['OrderID'])
				: json['OrderID'].toInt();
	}
	if (json['CategoryID'] != null) {
		data.categoryID = json['CategoryID'] is String
				? int.tryParse(json['CategoryID'])
				: json['CategoryID'].toInt();
	}
	if (json['CategoryName'] != null) {
		data.categoryName = json['CategoryName'].toString();
	}
	if (json['SubCategoryID'] != null) {
		data.subCategoryID = json['SubCategoryID'] is String
				? int.tryParse(json['SubCategoryID'])
				: json['SubCategoryID'].toInt();
	}
	if (json['SubCategoryName'] != null) {
		data.subCategoryName = json['SubCategoryName'].toString();
	}
	if (json['ProductTypeID'] != null) {
		data.productTypeID = json['ProductTypeID'] is String
				? int.tryParse(json['ProductTypeID'])
				: json['ProductTypeID'].toInt();
	}
	if (json['ProductType'] != null) {
		data.productType = json['ProductType'].toString();
	}
	if (json['ProdModelID'] != null) {
		data.prodModelID = json['ProdModelID'] is String
				? int.tryParse(json['ProdModelID'])
				: json['ProdModelID'].toInt();
	}
	if (json['ProdModelName'] != null) {
		data.prodModelName = json['ProdModelName'].toString();
	}
	if (json['Memo'] != null) {
		data.memo = json['Memo'].toString();
	}
	if (json['CreateDate'] != null) {
		data.createDate = json['CreateDate'].toString();
	}
	if (json['OrderNumber'] != null) {
		data.orderNumber = json['OrderNumber'].toString();
	}
	if (json['AudDate'] != null) {
		data.audDate = json['AudDate'];
	}
	if (json['ReceiveOrderDate'] != null) {
		data.receiveOrderDate = json['ReceiveOrderDate'];
	}
	if (json['RepairCompleteDate'] != null) {
		data.repairCompleteDate = json['RepairCompleteDate'];
	}
	if (json['AppraiseDate'] != null) {
		data.appraiseDate = json['AppraiseDate'];
	}
	if (json['State'] != null) {
		data.state = json['State'].toString();
	}
	if (json['SendUser'] != null) {
		data.sendUser = json['SendUser'].toString();
	}
	if (json['OrderProdMoney'] != null) {
		data.orderProdMoney = json['OrderProdMoney'] is String
				? double.tryParse(json['OrderProdMoney'])
				: json['OrderProdMoney'].toDouble();
	}
	if (json['InitMoney'] != null) {
		data.initMoney = json['InitMoney'] is String
				? double.tryParse(json['InitMoney'])
				: json['InitMoney'].toDouble();
	}
	if (json['BeyondMoney'] != null) {
		data.beyondMoney = json['BeyondMoney'] is String
				? double.tryParse(json['BeyondMoney'])
				: json['BeyondMoney'].toDouble();
	}
	if (json['TechnologyServiceMoney'] != null) {
		data.technologyServiceMoney = json['TechnologyServiceMoney'] is String
				? double.tryParse(json['TechnologyServiceMoney'])
				: json['TechnologyServiceMoney'].toDouble();
	}
	if (json['PostMoney'] != null) {
		data.postMoney = json['PostMoney'] is String
				? double.tryParse(json['PostMoney'])
				: json['PostMoney'].toDouble();
	}
	if (json['FactorySettlementMoney'] != null) {
		data.factorySettlementMoney = json['FactorySettlementMoney'] is String
				? double.tryParse(json['FactorySettlementMoney'])
				: json['FactorySettlementMoney'].toDouble();
	}
	if (json['AgainMoney'] != null) {
		data.againMoney = json['AgainMoney'] is String
				? double.tryParse(json['AgainMoney'])
				: json['AgainMoney'].toDouble();
	}
	if (json['MasterPrice'] != null) {
		data.masterPrice = json['MasterPrice'] is String
				? double.tryParse(json['MasterPrice'])
				: json['MasterPrice'].toDouble();
	}
	if (json['OtherMoney'] != null) {
		data.otherMoney = json['OtherMoney'] is String
				? double.tryParse(json['OtherMoney'])
				: json['OtherMoney'].toDouble();
	}
	if (json['terraceMoney'] != null) {
		data.terraceMoney = json['terraceMoney'] is String
				? double.tryParse(json['terraceMoney'])
				: json['terraceMoney'].toDouble();
	}
	if (json['MWSettlementMoney'] != null) {
		data.mWSettlementMoney = json['MWSettlementMoney'] is String
				? double.tryParse(json['MWSettlementMoney'])
				: json['MWSettlementMoney'].toDouble();
	}
	if (json['BrandID'] != null) {
		data.brandID = json['BrandID'] is String
				? int.tryParse(json['BrandID'])
				: json['BrandID'].toInt();
	}
	if (json['BrandName'] != null) {
		data.brandName = json['BrandName'].toString();
	}
	if (json['BuyingProductsTime'] != null) {
		data.buyingProductsTime = json['BuyingProductsTime'];
	}
	if (json['FactoryBarCode'] != null) {
		data.factoryBarCode = json['FactoryBarCode'].toString();
	}
	if (json['ExpressNo'] != null) {
		data.expressNo = json['ExpressNo'].toString();
	}
	if (json['accessory'] != null) {
		data.accessory = json['accessory'];
	}
	if (json['accessoryData'] != null) {
		data.accessoryData = new List<AccDetailOrderProductListAccessoryData>();
		(json['accessoryData'] as List).forEach((v) {
			data.accessoryData.add(new AccDetailOrderProductListAccessoryData().fromJson(v));
		});
	}
	if (json['SizeID'] != null) {
		data.sizeID = json['SizeID'] is String
				? int.tryParse(json['SizeID'])
				: json['SizeID'].toInt();
	}
	if (json['FrozenMoney'] != null) {
		data.frozenMoney = json['FrozenMoney'] is String
				? double.tryParse(json['FrozenMoney'])
				: json['FrozenMoney'].toDouble();
	}
	if (json['Num'] != null) {
		data.num = json['Num'] is String
				? int.tryParse(json['Num'])
				: json['Num'].toInt();
	}
	if (json['RelationParentProdID'] != null) {
		data.relationParentProdID = json['RelationParentProdID'] is String
				? int.tryParse(json['RelationParentProdID'])
				: json['RelationParentProdID'].toInt();
	}
	if (json['UserID'] != null) {
		data.userID = json['UserID'].toString();
	}
	if (json['ProductState'] != null) {
		data.productState = json['ProductState'] is String
				? int.tryParse(json['ProductState'])
				: json['ProductState'].toInt();
	}
	if (json['EndRemark'] != null) {
		data.endRemark = json['EndRemark'].toString();
	}
	if (json['RepairExplain'] != null) {
		data.repairExplain = json['RepairExplain'].toString();
	}
	if (json['BarCode'] != null) {
		data.barCode = json['BarCode'].toString();
	}
	if (json['EndImgUrls'] != null) {
		data.endImgUrls = new List<dynamic>();
		data.endImgUrls.addAll(json['EndImgUrls']);
	}
	if (json['Endvideo'] != null) {
		data.endvideo = new List<dynamic>();
		data.endvideo.addAll(json['Endvideo']);
	}
	if (json['CreateTime'] != null) {
		data.createTime = json['CreateTime'].toString();
	}
	if (json['CreateUserID'] != null) {
		data.createUserID = json['CreateUserID'].toString();
	}
	if (json['UpdateTime'] != null) {
		data.updateTime = json['UpdateTime'];
	}
	if (json['UpdateUserID'] != null) {
		data.updateUserID = json['UpdateUserID'].toString();
	}
	if (json['IsUse'] != null) {
		data.isUse = json['IsUse'].toString();
	}
	if (json['Version'] != null) {
		data.version = json['Version'] is String
				? int.tryParse(json['Version'])
				: json['Version'].toInt();
	}
	return data;
}

Map<String, dynamic> accDetailOrderProductListToJson(AccDetailOrderProductList entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['Id'] = entity.id;
	data['OrderProdcutID'] = entity.orderProdcutID;
	data['OrderID'] = entity.orderID;
	data['CategoryID'] = entity.categoryID;
	data['CategoryName'] = entity.categoryName;
	data['SubCategoryID'] = entity.subCategoryID;
	data['SubCategoryName'] = entity.subCategoryName;
	data['ProductTypeID'] = entity.productTypeID;
	data['ProductType'] = entity.productType;
	data['ProdModelID'] = entity.prodModelID;
	data['ProdModelName'] = entity.prodModelName;
	data['Memo'] = entity.memo;
	data['CreateDate'] = entity.createDate;
	data['OrderNumber'] = entity.orderNumber;
	data['AudDate'] = entity.audDate;
	data['ReceiveOrderDate'] = entity.receiveOrderDate;
	data['RepairCompleteDate'] = entity.repairCompleteDate;
	data['AppraiseDate'] = entity.appraiseDate;
	data['State'] = entity.state;
	data['SendUser'] = entity.sendUser;
	data['OrderProdMoney'] = entity.orderProdMoney;
	data['InitMoney'] = entity.initMoney;
	data['BeyondMoney'] = entity.beyondMoney;
	data['TechnologyServiceMoney'] = entity.technologyServiceMoney;
	data['PostMoney'] = entity.postMoney;
	data['FactorySettlementMoney'] = entity.factorySettlementMoney;
	data['AgainMoney'] = entity.againMoney;
	data['MasterPrice'] = entity.masterPrice;
	data['OtherMoney'] = entity.otherMoney;
	data['terraceMoney'] = entity.terraceMoney;
	data['MWSettlementMoney'] = entity.mWSettlementMoney;
	data['BrandID'] = entity.brandID;
	data['BrandName'] = entity.brandName;
	data['BuyingProductsTime'] = entity.buyingProductsTime;
	data['FactoryBarCode'] = entity.factoryBarCode;
	data['ExpressNo'] = entity.expressNo;
	data['accessory'] = entity.accessory;
	if (entity.accessoryData != null) {
		data['accessoryData'] =  entity.accessoryData.map((v) => v.toJson()).toList();
	}
	data['SizeID'] = entity.sizeID;
	data['FrozenMoney'] = entity.frozenMoney;
	data['Num'] = entity.num;
	data['RelationParentProdID'] = entity.relationParentProdID;
	data['UserID'] = entity.userID;
	data['ProductState'] = entity.productState;
	data['EndRemark'] = entity.endRemark;
	data['RepairExplain'] = entity.repairExplain;
	data['BarCode'] = entity.barCode;
	if (entity.endImgUrls != null) {
		data['EndImgUrls'] =  [];
	}
	if (entity.endvideo != null) {
		data['Endvideo'] =  [];
	}
	data['CreateTime'] = entity.createTime;
	data['CreateUserID'] = entity.createUserID;
	data['UpdateTime'] = entity.updateTime;
	data['UpdateUserID'] = entity.updateUserID;
	data['IsUse'] = entity.isUse;
	data['Version'] = entity.version;
	return data;
}

accDetailOrderProductListAccessoryDataFromJson(AccDetailOrderProductListAccessoryData data, Map<String, dynamic> json) {
	if (json['Id'] != null) {
		data.id = json['Id'] is String
				? int.tryParse(json['Id'])
				: json['Id'].toInt();
	}
	if (json['BrandID'] != null) {
		data.brandID = json['BrandID'] is String
				? int.tryParse(json['BrandID'])
				: json['BrandID'].toInt();
	}
	if (json['OldBeyondID'] != null) {
		data.oldBeyondID = json['OldBeyondID'].toString();
	}
	if (json['ApplyMaster'] != null) {
		data.applyMaster = json['ApplyMaster'] is String
				? int.tryParse(json['ApplyMaster'])
				: json['ApplyMaster'].toInt();
	}
	if (json['AccessoryID'] != null) {
		data.accessoryID = json['AccessoryID'] is String
				? int.tryParse(json['AccessoryID'])
				: json['AccessoryID'].toInt();
	}
	if (json['FAccessoryID'] != null) {
		data.fAccessoryID = json['FAccessoryID'] is String
				? int.tryParse(json['FAccessoryID'])
				: json['FAccessoryID'].toInt();
	}
	if (json['ReturnExpressNo'] != null) {
		data.returnExpressNo = json['ReturnExpressNo'].toString();
	}
	if (json['FAccessoryName'] != null) {
		data.fAccessoryName = json['FAccessoryName'].toString();
	}
	if (json['SendState'] != null) {
		data.sendState = json['SendState'].toString();
	}
	if (json['Quantity'] != null) {
		data.quantity = json['Quantity'] is String
				? int.tryParse(json['Quantity'])
				: json['Quantity'].toInt();
	}
	if (json['OrderID'] != null) {
		data.orderID = json['OrderID'] is String
				? int.tryParse(json['OrderID'])
				: json['OrderID'].toInt();
	}
	if (json['CreateTime'] != null) {
		data.createTime = json['CreateTime'].toString();
	}
	if (json['Relation'] != null) {
		data.relation = json['Relation'].toString();
	}
	if (json['Price'] != null) {
		data.price = json['Price'] is String
				? double.tryParse(json['Price'])
				: json['Price'].toDouble();
	}
	if (json['PostMoney'] != null) {
		data.postMoney = json['PostMoney'] is String
				? double.tryParse(json['PostMoney'])
				: json['PostMoney'].toDouble();
	}
	if (json['DiscountPrice'] != null) {
		data.discountPrice = json['DiscountPrice'] is String
				? double.tryParse(json['DiscountPrice'])
				: json['DiscountPrice'].toDouble();
	}
	if (json['IsUse'] != null) {
		data.isUse = json['IsUse'].toString();
	}
	if (json['SendAddress'] != null) {
		data.sendAddress = json['SendAddress'].toString();
	}
	if (json['IsPay'] != null) {
		data.isPay = json['IsPay'].toString();
	}
	if (json['ExpressNo'] != null) {
		data.expressNo = json['ExpressNo'].toString();
	}
	if (json['State'] != null) {
		data.state = json['State'].toString();
	}
	if (json['StateText'] != null) {
		data.stateText = json['StateText'].toString();
	}
	if (json['AccessoryState'] != null) {
		data.accessoryState = json['AccessoryState'].toString();
	}
	if (json['TypeID'] != null) {
		data.typeID = json['TypeID'].toString();
	}
	if (json['SizeID'] != null) {
		data.sizeID = json['SizeID'] is String
				? int.tryParse(json['SizeID'])
				: json['SizeID'].toInt();
	}
	if (json['FCategoryID'] != null) {
		data.fCategoryID = json['FCategoryID'] is String
				? int.tryParse(json['FCategoryID'])
				: json['FCategoryID'].toInt();
	}
	if (json['ApplyNum'] != null) {
		data.applyNum = json['ApplyNum'] is String
				? int.tryParse(json['ApplyNum'])
				: json['ApplyNum'].toInt();
	}
	if (json['Photo1'] != null) {
		data.photo1 = json['Photo1'].toString();
	}
	if (json['Photo2'] != null) {
		data.photo2 = json['Photo2'].toString();
	}
	if (json['Photos'] != null) {
		data.photos = new List<dynamic>();
		data.photos.addAll(json['Photos']);
	}
	if (json['NeedPlatformAuth'] != null) {
		data.needPlatformAuth = json['NeedPlatformAuth'].toString();
	}
	if (json['CheckRemarks'] != null) {
		data.checkRemarks = json['CheckRemarks'].toString();
	}
	if (json['Bak'] != null) {
		data.bak = json['Bak'].toString();
	}
	if (json['IsReturn'] != null) {
		data.isReturn = json['IsReturn'].toString();
	}
	if (json['PostPayType'] != null) {
		data.postPayType = json['PostPayType'].toString();
	}
	if (json['RecipientType'] != null) {
		data.recipientType = json['RecipientType'].toString();
	}
	if (json['OldReturnRequest'] != null) {
		data.oldReturnRequest = json['OldReturnRequest'].toString();
	}
	if (json['AddressBack'] != null) {
		data.addressBack = json['AddressBack'].toString();
	}
	if (json['QApplyNum'] != null) {
		data.qApplyNum = json['QApplyNum'] is String
				? int.tryParse(json['QApplyNum'])
				: json['QApplyNum'].toInt();
	}
	if (json['DeliverGoodsType'] != null) {
		data.deliverGoodsType = json['DeliverGoodsType'] is String
				? int.tryParse(json['DeliverGoodsType'])
				: json['DeliverGoodsType'].toInt();
	}
	if (json['DeliverGoodsTime'] != null) {
		data.deliverGoodsTime = json['DeliverGoodsTime'];
	}
	if (json['Order'] != null) {
		data.order = json['Order'];
	}
	if (json['limit'] != null) {
		data.limit = json['limit'] is String
				? int.tryParse(json['limit'])
				: json['limit'].toInt();
	}
	if (json['page'] != null) {
		data.page = json['page'] is String
				? int.tryParse(json['page'])
				: json['page'].toInt();
	}
	if (json['BeyondDistance'] != null) {
		data.beyondDistance = json['BeyondDistance'].toString();
	}
	if (json['ImgUrls'] != null) {
		data.imgUrls = new List<dynamic>();
		data.imgUrls.addAll(json['ImgUrls']);
	}
	if (json['OrderAttachments'] != null) {
		data.orderAttachments = new List<dynamic>();
		data.orderAttachments.addAll(json['OrderAttachments']);
	}
	if (json['AccessoryDetailModels'] != null) {
		data.accessoryDetailModels = new List<dynamic>();
		data.accessoryDetailModels.addAll(json['AccessoryDetailModels']);
	}
	if (json['AccessoryNo'] != null) {
		data.accessoryNo = json['AccessoryNo'].toString();
	}
	if (json['ReturnState'] != null) {
		data.returnState = json['ReturnState'].toString();
	}
	if (json['StopRemarks'] != null) {
		data.stopRemarks = json['StopRemarks'].toString();
	}
	if (json['GiveUpRemarks'] != null) {
		data.giveUpRemarks = json['GiveUpRemarks'].toString();
	}
	if (json['ProdName'] != null) {
		data.prodName = json['ProdName'].toString();
	}
	if (json['Version'] != null) {
		data.version = json['Version'] is String
				? int.tryParse(json['Version'])
				: json['Version'].toInt();
	}
	return data;
}

Map<String, dynamic> accDetailOrderProductListAccessoryDataToJson(AccDetailOrderProductListAccessoryData entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['Id'] = entity.id;
	data['BrandID'] = entity.brandID;
	data['OldBeyondID'] = entity.oldBeyondID;
	data['ApplyMaster'] = entity.applyMaster;
	data['AccessoryID'] = entity.accessoryID;
	data['FAccessoryID'] = entity.fAccessoryID;
	data['ReturnExpressNo'] = entity.returnExpressNo;
	data['FAccessoryName'] = entity.fAccessoryName;
	data['SendState'] = entity.sendState;
	data['Quantity'] = entity.quantity;
	data['OrderID'] = entity.orderID;
	data['CreateTime'] = entity.createTime;
	data['Relation'] = entity.relation;
	data['Price'] = entity.price;
	data['PostMoney'] = entity.postMoney;
	data['DiscountPrice'] = entity.discountPrice;
	data['IsUse'] = entity.isUse;
	data['SendAddress'] = entity.sendAddress;
	data['IsPay'] = entity.isPay;
	data['ExpressNo'] = entity.expressNo;
	data['State'] = entity.state;
	data['StateText'] = entity.stateText;
	data['AccessoryState'] = entity.accessoryState;
	data['TypeID'] = entity.typeID;
	data['SizeID'] = entity.sizeID;
	data['FCategoryID'] = entity.fCategoryID;
	data['ApplyNum'] = entity.applyNum;
	data['Photo1'] = entity.photo1;
	data['Photo2'] = entity.photo2;
	if (entity.photos != null) {
		data['Photos'] =  [];
	}
	data['NeedPlatformAuth'] = entity.needPlatformAuth;
	data['CheckRemarks'] = entity.checkRemarks;
	data['Bak'] = entity.bak;
	data['IsReturn'] = entity.isReturn;
	data['PostPayType'] = entity.postPayType;
	data['RecipientType'] = entity.recipientType;
	data['OldReturnRequest'] = entity.oldReturnRequest;
	data['AddressBack'] = entity.addressBack;
	data['QApplyNum'] = entity.qApplyNum;
	data['DeliverGoodsType'] = entity.deliverGoodsType;
	data['DeliverGoodsTime'] = entity.deliverGoodsTime;
	data['Order'] = entity.order;
	data['limit'] = entity.limit;
	data['page'] = entity.page;
	data['BeyondDistance'] = entity.beyondDistance;
	if (entity.imgUrls != null) {
		data['ImgUrls'] =  [];
	}
	if (entity.orderAttachments != null) {
		data['OrderAttachments'] =  [];
	}
	if (entity.accessoryDetailModels != null) {
		data['AccessoryDetailModels'] =  [];
	}
	data['AccessoryNo'] = entity.accessoryNo;
	data['ReturnState'] = entity.returnState;
	data['StopRemarks'] = entity.stopRemarks;
	data['GiveUpRemarks'] = entity.giveUpRemarks;
	data['ProdName'] = entity.prodName;
	data['Version'] = entity.version;
	return data;
}